<template>
  <div>
    <div class="list-top">
      <div>全城<img src="../../assets/xiangxia.png" alt="" /></div>
      <div>品牌<img src="../../assets/xiangxia.png" alt="" /></div>
      <div>特色<img src="../../assets/xiangxia.png" alt="" /></div>
    </div>
    <div class="kong"></div>
    <ul class="list">
      <li v-for="item in list" :key="item.id">
        <div class="list-store">
          {{ item.nm }} <span>{{ item.sellPrice }}</span
          ><span>元起</span>
        </div>
        <div class="list-dizhi">{{ item.addr }}</div>
        <div class="list-label">
          <span
            v-for="(i, index) in item.labels"
            :key="index"
            :style="[{ color: i.color }, { borderColor: i.color }]"
            >{{ i.name }}</span
          >
        </div>
        <div class="list-kaika">{{ item.promotion.cardPromotionTag }}</div>
      </li>
    </ul>
  </div>
</template>

<script>
import axios from "axios";
export default {
  // eslint-disable-next-line vue/multi-word-component-names
  name: "Yingyuan",
  data() {
    return {
      list: [],
    };
  },
  mounted() {
    axios.get("./yingyuan.json").then((res) => {
      console.log(res);
      this.list = res.data.data.cinemas;
    });
  },
};
</script>

<style lang="less" scoped>
body {
  font-size: 12px;
}
.kong {
  width: 100%;
  height: 40px;
  background: #fff;
}
.list-top {
  width: 100%;
  height: 1.0667rem;
  display: flex;
  justify-content: space-around;
  font-size: 13px;
  color: #777777;
  position: fixed;
  background: #fff;
  div {
    height: 1.0667rem;
    line-height: 1.0667rem;
    text-align: center;
    img {
      margin-left: 4px;
      margin-bottom: -1px;
    }
  }
}
.list li {
  border-bottom: 1px solid #eee;
  padding-top: 10px;
  padding-bottom: 10px;
  font-family: PingFangSC-Regular, Hiragino Sans GB, sans-serif, Helvetica,
    "宋体";
  padding-left: 14px;
  .list-store {
    font-size: 16px;
    color: #000;
    padding-bottom: 5px;
    span:nth-child(1) {
      font-size: 18px;
      color: #f03d37;
    }
    span:nth-child(2) {
      font-size: 12px;
    }
  }
  .list-dizhi {
    font-size: 13px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    color: #666;
    margin-bottom: 5px;
  }
}

.list .list-label span {
  display: inline-block;
  padding: 0px 2px;
  border: 1px solid #000;
  margin-right: 5px;
  border-radius: 4px;
}
.list-kaika {
  font-size: 12px;
  color: #999;
  margin-top: 5px;
}
</style>